# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: James P. Harvey <jamespharvey20 at gmail dot com>

pkgname=qperf
pkgver=0.4.11
pkgrel=3
pkgdesc='OpenFabrics Alliance InfiniBand performance benchmark for bandwidth and latency (supports TCP/IP and RDMA)'
arch=('loong64' 'x86_64')
url='https://github.com/linux-rdma/qperf'
license=('GPL2')
depends=('rdma-core')
source=("https://github.com/linux-rdma/qperf/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('b0ef2ffe050607566d06102b4ef6268aad08fdc52898620d429096e7b0767e75')

build() {
  cd $pkgname-$pkgver
  ./autogen.sh
  ./configure --prefix=/usr \
              --sbindir=/usr/bin \
              --libexecdir=/usr/lib \
              --sysconfdir=/etc \
              --localstatedir=/var \
              --mandir=/usr/share/man
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
